<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PPT大纲整理器</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-image: url('https://s2.loli.net/2024/05/13/oDmLOVNUujC8ZMS.jpg');
            background-size: cover;
            background-position: center;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            position: relative; /* 添加 position: relative 以便于定位子元素 */
        }
        .container {
            background-color: rgba(255, 255, 255, 0.8);
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 80%;
            max-width: 600px;
        }
        .container h1 {
            text-align: center;
            margin-bottom: 20px;
        }
        .container input[type="file"] {
            display: none;
        }
        .container label {
            display: block;
            margin: 0 auto 20px;
            padding: 10px 20px;
            background-color: #4c65af;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            text-align: center;
            width: fit-content;
        }
        .container label:hover {
            background-color: #3b4e9e;
        }
        .container button {
            display: block;
            margin: 10px auto;
            padding: 10px 20px;
            background-color: #4c65af;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        .container button:hover {
            background-color: #3b4e9e;
        }
        .error {
            color: red;
            text-align: center;
        }
        .back-button {
            position: absolute;
            bottom: 20px;
            left: 20px;
            background-color: #4c65af;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        .back-button:hover {
            background-color: #3b4e9e;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>PPT大纲整理器</h1>
        {% with messages = get_flashed_messages() %}
            {% if messages %}
                <div class="error">
                    {{ messages[0] }}
                </div>
            {% endif %}
        {% endwith %}
        <form action="/upload" method="post" enctype="multipart/form-data">
            <label for="file-upload">选择文件</label>
            <input type="file" id="file-upload" name="file" accept=".pptx">
            <button type="submit">上传并整理</button>
        </form>
    </div>
    <button class="back-button" onclick="window.location.href='/'">返回主页</button>
</body>
</html>
